<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      #father {
        width: 500px;
        height: 500px;
        background-color: skyblue;
      }
      .box {
        width: 300px;
        height: 300px;
        background-color: pink;
      }
    </style>
  </head>
  <body>
    <div id="father" @click.self="fn">
      <div class="box" @click="fn3">
        <div id="add">
          <button @click.stop="fn2">123</button>
        </div>
      </div>
    </div>
    <script src="../vue.js"></script>
    <script>
      new Vue({
        el: "#father",
        data: {},
        methods: {
          fn() {
            alert("???")
          },
          fn2() {
            alert("!!")
          },
          fn3() {
            alert(".....")
          },
        },
      })
      //prevent 是阻止默认行为
      //stop是阻止冒泡
      //once是只执行一次
      //self是只自己执行
    </script>
  </body>
</html>
